<template>
  <!-- 应答明细信息查看原交易页面弹出框-->
  <el-dialog
    :title="title"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="false"
    @close="closeFn"
    append-to-body
  >
    <el-form ref="detailsForm" :model="formData" :rules="rules" label-width="170px" :disabled="true">
      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="交易流水号：" prop="id">
            <el-input v-model="formData.id" placeholder="交易流水号" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="报文标识号：" prop="pkgId">
            <el-input v-model="formData.pkgId" placeholder="报文标识号" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="CPG日期" prop="workdate">
            <el-date-picker v-model="formData.workdate" style="width: 100%" type="date" value-format="yyyyMMdd" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="大小额日期" prop="vdate">
            <el-date-picker v-model="formData.vdate" style="width: 100%" type="date" value-format="yyyyMMdd" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="报文类型" prop="pkgNo">
            <el-select style="width: 100%" v-model="formData.pkgNo" placeholder="报文类型">
              <el-option
                v-for="dict in dictMap.PKG_TYPE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="来往账方向" prop="drct">
            <el-select style="width: 100%" v-model="formData.drct" placeholder="来往账方向">
              <el-option
                v-for="dict in dictMap.DRCTCODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="系统编号" prop="sysCode">
            <el-select style="width: 100%" v-model="formData.sysCode" placeholder="系统编号">
              <el-option
                v-for="dict in dictMap.SYSTEMCODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="业务类型" prop="bizType">
            <el-select style="width: 100%" v-model="formData.bizType" placeholder="业务类型">
              <el-option
                v-for="dict in dictMap.BIZ_TYPECODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="业务种类" prop="bizCtgyCode">
            <el-select style="width: 100%" v-model="formData.bizCtgyCode" placeholder="业务种类">
              <el-option
                v-for="dict in dictMap.BIZ_CTGY"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="内部机构号" prop="brno">
            <el-select style="width: 100%" v-model="formData.brno" placeholder="内部机构号">
              <el-option
                v-for="dict in dictMap['Cnaps2Dict.CP2_BRNO']"
                :key="dict.value"
                :label="`${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <el-form-item label="备注" prop="remarks">
            <el-input type="textarea" v-model="formData.remarks" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="24">
          <el-form-item label="附言" prop="addInfo">
            <el-input type="textarea" v-model="formData.addInfo" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="原报文标识号" prop="oriPkgId">
            <el-input v-model="formData.oriPkgId" />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="原报文类型" prop="oriMsgType">
            <el-select style="width: 100%" v-model="formData.oriMsgType" placeholder="原报文类型">
              <el-option
                v-for="dict in dictMap.BIZ_TYPECODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="原发起参与机构" prop="oriSender">
            <el-input v-model="formData.oriSender" />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="原发起参与机构名" prop="oriSenderName">
            <el-input v-model="formData.oriSenderName" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="借贷标识" prop="cdIndicator">
            <el-select style="width: 100%" v-model="formData.cdIndicator" placeholder="借贷标识">
              <el-option
                v-for="dict in dictMap.CREDITDEBITCODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="轧差场次" prop="nettingRound">
            <el-input v-model="formData.nettingRound" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="客户业务金额币种" prop="curcd">
            <el-input v-model="formData.curcd" />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="客户业务金额" prop="amount">
            <ht-amount-input v-model="formData.amount" placeholder="客户业务金额" :disable="true"></ht-amount-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="当前余额币种" prop="balCurcd">
            <el-input v-model="formData.balCurcd" />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="当前余额" prop="balAmount">
            <ht-amount-input v-model="formData.balAmount" placeholder="当前余额" :disable="true"></ht-amount-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row type="flex">
        <el-col :span="12">
          <el-form-item label="接收时间" prop="rcvTime">
            <el-date-picker
              style="width: 100%"
              v-model="formData.rcvTime"
              value-format="yyyyMMddHHmmss"
              type="datetime"
            />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="closeFn">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { log } from "util";
import HtAmountInput from "@/views/components/HtAmountInput";
export default {
  name: "oriView633",
  components: { HtAmountInput },
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
      isLoading: false,
      rules: {},
      title:""
    };
  },
  watch: {
    open(val) {
      if (val) {
      }
    },
  },
  mounted() {},
  methods: {
    // 表单重置
    reset() {
      this.resetForm("detailsForm");
      // this.$set(this, "form", {});
    },
    closeFn() {
      this.open = false;
      this.reset();
    },
    show(title) {
      this.title = title
      this.open = true;
    },
  },
};
</script>
<style lang="scss" scoped>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
